#!/bin/sh

# Ancescon only runs on Linux & Solaris.
# This script will allow execute this program from the 143 program directly
# from your command prompt or other applications

aln=$1
name=$2
mine=$3
if [ -f $aln ]
then	
	server='132.239.144.143'
	filename="alignment${RANDOM}"
	scp $aln saierlab@$server:/tmp/$filename
	ssh -l saierlab $server "ancescon -O -RO -i /tmp/${filename} -o /tmp/$2"
	scp saierlab@$server:/tmp/$2 $mine
else
	echo "No alignment file found"
fi